#include "PlayerBonus.h"
#include "Player.h"
#include "SoundEngine.h"

PlayerBonus::PlayerBonus (const Point3d &pos, const RGBd &col, double healing) : Bonus(pos,col), healing(healing) { }

void
PlayerBonus::applyBonus (Player *p)
{
	p->takenPowerUp();
	double life = p->getLife();
	p->getObject()->setLife(healing+life);
	SoundEngine::getInstance()->play("PowerUp");
	this->alive() = false;
}